package com.kanshu.ksgb.fastread.doudou.module.login.thirdlogin;

import com.kanshu.ksgb.fastread.doudou.common.net.bean.BaseResult;
import com.kanshu.ksgb.fastread.doudou.module.login.bean.BindUserBean;
import com.kanshu.ksgb.fastread.doudou.module.personal.bean.ThirdBindInfo;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

/**
 * Created by wcy on 2017\6\28 0028.
 */

public interface ThirdService {
    // 用户绑定
    @FormUrlEncoded
    @POST("yd/user/appthirdpartybind")
    Observable<BaseResult<BindUserBean>> bindUser(@FieldMap Map<String, String> map);
    // 微信访问accesstoken
    @GET("sns/oauth2/access_token")
    Observable<ResponseBody> getAccessToken(@QueryMap Map<String, String> map);
    // 微信获取用户信息
    @GET("sns/userinfo")
    Observable<ResponseBody> getWxUserInfo(@QueryMap Map<String, String> map);
    // 微博获取用户信息
    @GET("2/users/show.json")
    Observable<ResponseBody> getWbUserInfo(@QueryMap Map<String, String> map);


    @FormUrlEncoded
    @POST("app/extract/weixinbind")
    Observable<BaseResult<String>> bindWxWithdraw(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("app/extract/alipaybind")
    Observable<BaseResult<String>> bindAlipayWithdraw(@FieldMap Map<String, String> map);
}
